package org.springblade.modules.platform.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author SYG
 * @since 2023-08-01
 */

@Builder
public class SysParameterVO {

    /**
     * 主键
     */
    private Long id;


    @ApiModelProperty(value = "侧台ID")
    private Long measuringPlatformId;
    /**
     * 设备ID
     */
    @ApiModelProperty(value = "设备通道ID(地址)")
    private String deviceChannelId;

    /**
     * 设备名称
     */
    @ApiModelProperty(name = "设备名称")
    private String deviceName;

    @ApiModelProperty(value = "集合")
    private List<ParameterVO> parameterVOS;

    @Override
    public String toString() {
        return "SysParameterVO{" +
                "id=" + id +
                ", measuringPlatformId=" + measuringPlatformId +
                ", deviceChannelId='" + deviceChannelId + '\'' +
                ", deviceName='" + deviceName + '\'' +
                ", parameterVOS=" + parameterVOS +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMeasuringPlatformId() {
        return measuringPlatformId;
    }

    public void setMeasuringPlatformId(Long measuringPlatformId) {
        this.measuringPlatformId = measuringPlatformId;
    }

    public String getDeviceChannelId() {
        return deviceChannelId;
    }

    public void setDeviceChannelId(String deviceChannelId) {
        this.deviceChannelId = deviceChannelId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public List<ParameterVO> getParameterVOS() {
        return parameterVOS;
    }

    public void setParameterVOS(List<ParameterVO> parameterVOS) {
        this.parameterVOS = parameterVOS;
    }

    @NoArgsConstructor
    @Data
    public static class ParameterVO {

        /**
         * 物理量字段
         */
        @ApiModelProperty(name = "物理量字段")
        private String parameterKey;
        /**
         * 物理量字段
         */
        @ApiModelProperty(name = "传感器编号")
        private String sensorNumber;

        @ApiModelProperty(value = "集合")
        private List<ParameterValueVO> parameterValueVOS;


        public String getParameterKey() {
            return parameterKey;
        }

        public void setParameterKey(String parameterKey) {
            this.parameterKey = parameterKey;
        }

        public String getSensorNumber() {
            return sensorNumber;
        }

        public void setSensorNumber(String sensorNumber) {
            this.sensorNumber = sensorNumber;
        }


        public List<ParameterValueVO> getParameterValueVOS() {
            return parameterValueVOS;
        }

        public void setParameterValueVOS(List<ParameterValueVO> parameterValueVOS) {
            this.parameterValueVOS = parameterValueVOS;
        }

        @NoArgsConstructor
        @Data
        public static class ParameterValueVO {

            /**
             * 主键
             */
            private Long id;
            /**
             * 小值
             */
            @ApiModelProperty(name = "小值")
            private Double minValue;
            /**
             * 大值
             */
            @ApiModelProperty(name = "大值")
            private Double maxValue;
            /**
             * 倾角X系数K
             */
            @ApiModelProperty(name = "倾角X系数K")
            private Double dipXK;
            /**
             * 倾角X系数B
             */
            @ApiModelProperty(name = "倾角X系数B")
            private Double dipXB;

            public Long getId() {
                return id;
            }

            public void setId(Long id) {
                this.id = id;
            }

            public Double getMinValue() {
                return minValue;
            }

            public void setMinValue(Double minValue) {
                this.minValue = minValue;
            }

            public Double getMaxValue() {
                return maxValue;
            }

            public void setMaxValue(Double maxValue) {
                this.maxValue = maxValue;
            }

            public Double getDipXK() {
                return dipXK;
            }

            public void setDipXK(Double dipXK) {
                this.dipXK = dipXK;
            }

            public Double getDipXB() {
                return dipXB;
            }

            public void setDipXB(Double dipXB) {
                this.dipXB = dipXB;
            }
        }

    }


}
